RequestEffectOptionsType
import { RequestEffectOptionsType } from "@hyper-fetch/core"
Description
Defined in effect/request.effect.types.ts:10
Preview
type RequestEffectOptionsType<T> = {
effectKey: string;
onError: (response: ResponseReturnErrorType<ExtractErrorType<T>, ExtractAdapterType<T>>, request: RequestInstance) => void;
onFinished: (response: ResponseReturnType<ExtractResponseType<T>, ExtractErrorType<T>, ExtractAdapterType<T>>, request: RequestInstance) => void;
onStart: (request: RequestInstance) => void;
onSuccess: (response: ResponseReturnSuccessType<ExtractResponseType<T>, ExtractAdapterType<T>>, request: RequestInstance) => void;
onTrigger: (request: RequestInstance) => void;
}
Structure
{
effectKey: string;
onError: (response: ResponseReturnErrorType<ExtractErrorType<T>, ExtractAdapterType<T>>, request: RequestInstance) => void;
onFinished: (response: ResponseReturnType<ExtractResponseType<T>, ExtractErrorType<T>, ExtractAdapterType<T>>, request: RequestInstance) => void;
onStart: (request: RequestInstance) => void;
onSuccess: (response: ResponseReturnSuccessType<ExtractResponseType<T>, ExtractAdapterType<T>>, request: RequestInstance) => void;
onTrigger: (request: RequestInstance) => void;
}